<?php
    /**
    *   $aResultSearchs = array(
    *       'keyword' => '',
    *       'type' => '',
    *       'name' => '',
    *       'uri' => '',
    *       'image' => '',
    *       'description' => '',
    *       'location' => '',
    *   );
    */
?>

<div class="result_search_content">
    <?php 
        if($template->get('aResultSearchs')){foreach($template->get('aResultSearchs') as $aItem){?>
        <div class="result_result">
            <div class="result_result_avatar">
                <img src="<?php echo URL::getLink((isset($aItem['image']) ? 'upload/'.$aItem['image'] : 'image/default_user')); ?>" alt="">
            </div>
            <div class="result_result_info">
                <p class="result_result_info_title">
                    <a href="<?php echo $aItem['uri']; ?>">
                        <?php echo (isset($aItem['familyName']) ? Text::hightLight($aItem['familyName'],$template->get('keyword'))  : Text::hightLight($aItem['name'],$template->get('keyword'))); ?>
                    </a>
                </p>
                <p class="result_result_info_link">
                    <a href="<?php echo $aItem['uri']; ?>"><?php echo $aItem['uri']; ?></a>
                </p>
                <?php if(isset($aItem['userName'])){ ?>
                    <p class="result_result_info_user">Dang boi <strong>
                    <a href="<?php echo $aItem['userUri']; ?>"><?php echo Text::hightLight($aItem['userName'],$template->get('keyword')); ?></a></strong>
                    </p>
                <?php } ?>
                <?php if(isset($aItem['description'])){ ?>
                    <p class="result_result_info_description">Mo ta: <?php echo Text::hightLight($aItem['description'],$template->get('keyword')); ?></p>
                <?php } ?>
                <?php if(isset($aItem['location'])){ ?>
                    <p class="result_result_info_location">Dia chi <strong><?php echo Text::hightLight($aItem['location'],$template->get('keyword')); ?></strong></p>
                <?php } ?>
            </div>
            <div style="clear: both;"></div>
        </div>
        <?php }}?>
    <div style="clear: both;"></div>
</div>
